package com.ruoyi.orders.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.orders.mapper.SmartPurchaseRecordMapper;
import com.ruoyi.orders.domain.SmartPurchaseRecord;
import com.ruoyi.orders.service.ISmartPurchaseRecordService;

/**
 * 产品订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-01
 */
@Service
public class SmartPurchaseRecordServiceImpl implements ISmartPurchaseRecordService 
{
    @Autowired
    private SmartPurchaseRecordMapper smartPurchaseRecordMapper;

    /**
     * 查询产品订单
     * 
     * @param scRecordId 产品订单主键
     * @return 产品订单
     */
    @Override
    public SmartPurchaseRecord selectSmartPurchaseRecordByScRecordId(Long scRecordId)
    {
        return smartPurchaseRecordMapper.selectSmartPurchaseRecordByScRecordId(scRecordId);
    }

    /**
     * 查询产品订单列表
     * 
     * @param smartPurchaseRecord 产品订单
     * @return 产品订单
     */
    @Override
    public List<SmartPurchaseRecord> selectSmartPurchaseRecordList(SmartPurchaseRecord smartPurchaseRecord)
    {
        return smartPurchaseRecordMapper.selectSmartPurchaseRecordList(smartPurchaseRecord);
    }

    /**
     * 新增产品订单
     * 
     * @param smartPurchaseRecord 产品订单
     * @return 结果
     */
    @Override
    public int insertSmartPurchaseRecord(SmartPurchaseRecord smartPurchaseRecord)
    {
        return smartPurchaseRecordMapper.insertSmartPurchaseRecord(smartPurchaseRecord);
    }

    /**
     * 修改产品订单
     * 
     * @param smartPurchaseRecord 产品订单
     * @return 结果
     */
    @Override
    public int updateSmartPurchaseRecord(SmartPurchaseRecord smartPurchaseRecord)
    {
        return smartPurchaseRecordMapper.updateSmartPurchaseRecord(smartPurchaseRecord);
    }

    /**
     * 批量删除产品订单
     * 
     * @param scRecordIds 需要删除的产品订单主键
     * @return 结果
     */
    @Override
    public int deleteSmartPurchaseRecordByScRecordIds(Long[] scRecordIds)
    {
        return smartPurchaseRecordMapper.deleteSmartPurchaseRecordByScRecordIds(scRecordIds);
    }

    /**
     * 删除产品订单信息
     * 
     * @param scRecordId 产品订单主键
     * @return 结果
     */
    @Override
    public int deleteSmartPurchaseRecordByScRecordId(Long scRecordId)
    {
        return smartPurchaseRecordMapper.deleteSmartPurchaseRecordByScRecordId(scRecordId);
    }
}
